\(\int \frac {\sqrt {a+\frac {b}{x}}}{\sqrt {c+\frac {d}{x}}} \, dx\) [267]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [B] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [F]
   Giac [F]
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 23, antiderivative size = 81 \[ \int \frac {\sqrt {a+\frac {b}{x}}}{\sqrt {c+\frac {d}{x}}} \, dx=\frac {\sqrt {a+\frac {b}{x}} \sqrt {c+\frac {d}{x}} x}{c}+\frac {(b c-a d) \text {arctanh}\left (\frac {\sqrt {c} \sqrt {a+\frac {b}{x}}}{\sqrt {a} \sqrt {c+\frac {d}{x}}}\right )}{\sqrt {a} c^{3/2}} \]

[Out]

(-a*d+b*c)*arctanh(c^(1/2)*(a+b/x)^(1/2)/a^(1/2)/(c+d/x)^(1/2))/c^(3/2)/a^(1/2)+x*(a+b/x)^(1/2)*(c+d/x)^(1/2)/
c

Rubi [A] (verified)

Time = 0.04 (sec) , antiderivative size = 81, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {382, 96, 95, 214} \[ \int \frac {\sqrt {a+\frac {b}{x}}}{\sqrt {c+\frac {d}{x}}} \, dx=\frac {(b c-a d) \text {arctanh}\left (\frac {\sqrt {c} \sqrt {a+\frac {b}{x}}}{\sqrt {a} \sqrt {c+\frac {d}{x}}}\right )}{\sqrt {a} c^{3/2}}+\frac {x \sqrt {a+\frac {b}{x}} \sqrt {c+\frac {d}{x}}}{c} \]

[In]

Int[Sqrt[a + b/x]/Sqrt[c + d/x],x]

[Out]

(Sqrt[a + b/x]*Sqrt[c + d/x]*x)/c + ((b*c - a*d)*ArcTanh[(Sqrt[c]*Sqrt[a + b/x])/(Sqrt[a]*Sqrt[c + d/x])])/(Sq
rt[a]*c^(3/2))

Rule 95

Int[(((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_))/((e_.) + (f_.)*(x_)), x_Symbol] :> With[{q = Denomin
ator[m]}, Dist[q, Subst[Int[x^(q*(m + 1) - 1)/(b*e - a*f - (d*e - c*f)*x^q), x], x, (a + b*x)^(1/q)/(c + d*x)^
(1/q)], x]] /; FreeQ[{a, b, c, d, e, f}, x] && EqQ[m + n + 1, 0] && RationalQ[n] && LtQ[-1, m, 0] && SimplerQ[
a + b*x, c + d*x]

Rule 96

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Simp[(a + b*
x)^(m + 1)*(c + d*x)^n*((e + f*x)^(p + 1)/((m + 1)*(b*e - a*f))), x] - Dist[n*((d*e - c*f)/((m + 1)*(b*e - a*f
))), Int[(a + b*x)^(m + 1)*(c + d*x)^(n - 1)*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, m, p}, x] && EqQ[
m + n + p + 2, 0] && GtQ[n, 0] && (SumSimplerQ[m, 1] ||  !SumSimplerQ[p, 1]) && NeQ[m, -1]

Rule 214

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x/Rt[-a/b, 2]], x] /; FreeQ[{a, b},
x] && NegQ[a/b]

Rule 382

Int[((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.), x_Symbol] :> -Subst[Int[(a + b/x^n)^p*((c +
 d/x^n)^q/x^2), x], x, 1/x] /; FreeQ[{a, b, c, d, p, q}, x] && NeQ[b*c - a*d, 0] && ILtQ[n, 0]

Rubi steps \begin{align*} \text {integral}& = -\text {Subst}\left (\int \frac {\sqrt {a+b x}}{x^2 \sqrt {c+d x}} \, dx,x,\frac {1}{x}\right ) \\ & = \frac {\sqrt {a+\frac {b}{x}} \sqrt {c+\frac {d}{x}} x}{c}-\frac {(b c-a d) \text {Subst}\left (\int \frac {1}{x \sqrt {a+b x} \sqrt {c+d x}} \, dx,x,\frac {1}{x}\right )}{2 c} \\ & = \frac {\sqrt {a+\frac {b}{x}} \sqrt {c+\frac {d}{x}} x}{c}-\frac {(b c-a d) \text {Subst}\left (\int \frac {1}{-a+c x^2} \, dx,x,\frac {\sqrt {a+\frac {b}{x}}}{\sqrt {c+\frac {d}{x}}}\right )}{c} \\ & = \frac {\sqrt {a+\frac {b}{x}} \sqrt {c+\frac {d}{x}} x}{c}+\frac {(b c-a d) \tanh ^{-1}\left (\frac {\sqrt {c} \sqrt {a+\frac {b}{x}}}{\sqrt {a} \sqrt {c+\frac {d}{x}}}\right )}{\sqrt {a} c^{3/2}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.36 (sec) , antiderivative size = 113, normalized size of antiderivative = 1.40 \[ \int \frac {\sqrt {a+\frac {b}{x}}}{\sqrt {c+\frac {d}{x}}} \, dx=\frac {\sqrt {a+\frac {b}{x}} \sqrt {d+c x} \left (\frac {\sqrt {b+a x} \sqrt {d+c x}}{c}+\frac {(b c-a d) \text {arctanh}\left (\frac {\sqrt {a} \sqrt {d+c x}}{\sqrt {c} \sqrt {b+a x}}\right )}{\sqrt {a} c^{3/2}}\right )}{\sqrt {c+\frac {d}{x}} \sqrt {b+a x}} \]

[In]

Integrate[Sqrt[a + b/x]/Sqrt[c + d/x],x]

[Out]

(Sqrt[a + b/x]*Sqrt[d + c*x]*((Sqrt[b + a*x]*Sqrt[d + c*x])/c + ((b*c - a*d)*ArcTanh[(Sqrt[a]*Sqrt[d + c*x])/(
Sqrt[c]*Sqrt[b + a*x])])/(Sqrt[a]*c^(3/2))))/(Sqrt[c + d/x]*Sqrt[b + a*x])

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(154\) vs. \(2(65)=130\).

Time = 0.13 (sec) , antiderivative size = 155, normalized size of antiderivative = 1.91

method result size
default \(\frac {\sqrt {\frac {a x +b}{x}}\, x \sqrt {\frac {c x +d}{x}}\, \left (-\ln \left (\frac {2 a c x +2 \sqrt {\left (a x +b \right ) \left (c x +d \right )}\, \sqrt {a c}+a d +b c}{2 \sqrt {a c}}\right ) a d +\ln \left (\frac {2 a c x +2 \sqrt {\left (a x +b \right ) \left (c x +d \right )}\, \sqrt {a c}+a d +b c}{2 \sqrt {a c}}\right ) b c +2 \sqrt {\left (a x +b \right ) \left (c x +d \right )}\, \sqrt {a c}\right )}{2 \sqrt {\left (a x +b \right ) \left (c x +d \right )}\, c \sqrt {a c}}\) \(155\)

[In]

int((a+b/x)^(1/2)/(c+d/x)^(1/2),x,method=_RETURNVERBOSE)

[Out]

1/2*((a*x+b)/x)^(1/2)*x*((c*x+d)/x)^(1/2)*(-ln(1/2*(2*a*c*x+2*((a*x+b)*(c*x+d))^(1/2)*(a*c)^(1/2)+a*d+b*c)/(a*
c)^(1/2))*a*d+ln(1/2*(2*a*c*x+2*((a*x+b)*(c*x+d))^(1/2)*(a*c)^(1/2)+a*d+b*c)/(a*c)^(1/2))*b*c+2*((a*x+b)*(c*x+
d))^(1/2)*(a*c)^(1/2))/((a*x+b)*(c*x+d))^(1/2)/c/(a*c)^(1/2)

Fricas [A] (verification not implemented)

none

Time = 0.41 (sec) , antiderivative size = 247, normalized size of antiderivative = 3.05 \[ \int \frac {\sqrt {a+\frac {b}{x}}}{\sqrt {c+\frac {d}{x}}} \, dx=\left [\frac {4 \, a c x \sqrt {\frac {a x + b}{x}} \sqrt {\frac {c x + d}{x}} - \sqrt {a c} {\left (b c - a d\right )} \log \left (-8 \, a^{2} c^{2} x^{2} - b^{2} c^{2} - 6 \, a b c d - a^{2} d^{2} + 4 \, {\left (2 \, a c x^{2} + {\left (b c + a d\right )} x\right )} \sqrt {a c} \sqrt {\frac {a x + b}{x}} \sqrt {\frac {c x + d}{x}} - 8 \, {\left (a b c^{2} + a^{2} c d\right )} x\right )}{4 \, a c^{2}}, \frac {2 \, a c x \sqrt {\frac {a x + b}{x}} \sqrt {\frac {c x + d}{x}} - \sqrt {-a c} {\left (b c - a d\right )} \arctan \left (\frac {2 \, \sqrt {-a c} x \sqrt {\frac {a x + b}{x}} \sqrt {\frac {c x + d}{x}}}{2 \, a c x + b c + a d}\right )}{2 \, a c^{2}}\right ] \]

[In]

integrate((a+b/x)^(1/2)/(c+d/x)^(1/2),x, algorithm="fricas")

[Out]

[1/4*(4*a*c*x*sqrt((a*x + b)/x)*sqrt((c*x + d)/x) - sqrt(a*c)*(b*c - a*d)*log(-8*a^2*c^2*x^2 - b^2*c^2 - 6*a*b
*c*d - a^2*d^2 + 4*(2*a*c*x^2 + (b*c + a*d)*x)*sqrt(a*c)*sqrt((a*x + b)/x)*sqrt((c*x + d)/x) - 8*(a*b*c^2 + a^
2*c*d)*x))/(a*c^2), 1/2*(2*a*c*x*sqrt((a*x + b)/x)*sqrt((c*x + d)/x) - sqrt(-a*c)*(b*c - a*d)*arctan(2*sqrt(-a
*c)*x*sqrt((a*x + b)/x)*sqrt((c*x + d)/x)/(2*a*c*x + b*c + a*d)))/(a*c^2)]

Sympy [F]

\[ \int \frac {\sqrt {a+\frac {b}{x}}}{\sqrt {c+\frac {d}{x}}} \, dx=\int \frac {\sqrt {a + \frac {b}{x}}}{\sqrt {c + \frac {d}{x}}}\, dx \]

[In]

integrate((a+b/x)**(1/2)/(c+d/x)**(1/2),x)

[Out]

Integral(sqrt(a + b/x)/sqrt(c + d/x), x)

Maxima [F]

\[ \int \frac {\sqrt {a+\frac {b}{x}}}{\sqrt {c+\frac {d}{x}}} \, dx=\int { \frac {\sqrt {a + \frac {b}{x}}}{\sqrt {c + \frac {d}{x}}} \,d x } \]

[In]

integrate((a+b/x)^(1/2)/(c+d/x)^(1/2),x, algorithm="maxima")

[Out]

integrate(sqrt(a + b/x)/sqrt(c + d/x), x)

Giac [F]

\[ \int \frac {\sqrt {a+\frac {b}{x}}}{\sqrt {c+\frac {d}{x}}} \, dx=\int { \frac {\sqrt {a + \frac {b}{x}}}{\sqrt {c + \frac {d}{x}}} \,d x } \]

[In]

integrate((a+b/x)^(1/2)/(c+d/x)^(1/2),x, algorithm="giac")

[Out]

integrate(sqrt(a + b/x)/sqrt(c + d/x), x)

Mupad [B] (verification not implemented)

Time = 10.77 (sec) , antiderivative size = 478, normalized size of antiderivative = 5.90 \[ \int \frac {\sqrt {a+\frac {b}{x}}}{\sqrt {c+\frac {d}{x}}} \, dx=\frac {d\,\left (\sqrt {a+\frac {b}{x}}-\sqrt {a}\right )}{4\,c\,\left (\sqrt {c+\frac {d}{x}}-\sqrt {c}\right )}-\frac {\frac {\left (\sqrt {a+\frac {b}{x}}-\sqrt {a}\right )\,\left (\frac {c\,b^2}{4}+\frac {a\,d\,b}{4}\right )}{\sqrt {a}\,c^{3/2}\,d\,\left (\sqrt {c+\frac {d}{x}}-\sqrt {c}\right )}-\frac {b^2}{4\,c\,d}+\frac {{\left (\sqrt {a+\frac {b}{x}}-\sqrt {a}\right )}^2\,\left (\frac {a^2\,d^2}{4}-\frac {3\,a\,b\,c\,d}{4}+\frac {b^2\,c^2}{4}\right )}{a\,c^2\,d\,{\left (\sqrt {c+\frac {d}{x}}-\sqrt {c}\right )}^2}}{\frac {{\left (\sqrt {a+\frac {b}{x}}-\sqrt {a}\right )}^3}{{\left (\sqrt {c+\frac {d}{x}}-\sqrt {c}\right )}^3}+\frac {b\,\left (\sqrt {a+\frac {b}{x}}-\sqrt {a}\right )}{d\,\left (\sqrt {c+\frac {d}{x}}-\sqrt {c}\right )}-\frac {{\left (\sqrt {a+\frac {b}{x}}-\sqrt {a}\right )}^2\,\left (a\,d+b\,c\right )}{\sqrt {a}\,\sqrt {c}\,d\,{\left (\sqrt {c+\frac {d}{x}}-\sqrt {c}\right )}^2}}+\frac {\ln \left (\frac {\sqrt {a+\frac {b}{x}}-\sqrt {a}}{\sqrt {c+\frac {d}{x}}-\sqrt {c}}\right )\,\left (\sqrt {a}\,b\,c^{3/2}-a^{3/2}\,\sqrt {c}\,d\right )}{2\,a\,c^2}-\frac {\ln \left (\frac {\left (\sqrt {c}\,\sqrt {a+\frac {b}{x}}-\sqrt {a}\,\sqrt {c+\frac {d}{x}}\right )\,\left (b\,\sqrt {c}-\frac {\sqrt {a}\,d\,\left (\sqrt {a+\frac {b}{x}}-\sqrt {a}\right )}{\sqrt {c+\frac {d}{x}}-\sqrt {c}}\right )}{\sqrt {c+\frac {d}{x}}-\sqrt {c}}\right )\,\left (\sqrt {a}\,b\,c^{3/2}-a^{3/2}\,\sqrt {c}\,d\right )}{2\,a\,c^2} \]

[In]

int((a + b/x)^(1/2)/(c + d/x)^(1/2),x)

[Out]

(d*((a + b/x)^(1/2) - a^(1/2)))/(4*c*((c + d/x)^(1/2) - c^(1/2))) - ((((a + b/x)^(1/2) - a^(1/2))*((b^2*c)/4 +
 (a*b*d)/4))/(a^(1/2)*c^(3/2)*d*((c + d/x)^(1/2) - c^(1/2))) - b^2/(4*c*d) + (((a + b/x)^(1/2) - a^(1/2))^2*((
a^2*d^2)/4 + (b^2*c^2)/4 - (3*a*b*c*d)/4))/(a*c^2*d*((c + d/x)^(1/2) - c^(1/2))^2))/(((a + b/x)^(1/2) - a^(1/2
))^3/((c + d/x)^(1/2) - c^(1/2))^3 + (b*((a + b/x)^(1/2) - a^(1/2)))/(d*((c + d/x)^(1/2) - c^(1/2))) - (((a +
b/x)^(1/2) - a^(1/2))^2*(a*d + b*c))/(a^(1/2)*c^(1/2)*d*((c + d/x)^(1/2) - c^(1/2))^2)) + (log(((a + b/x)^(1/2
) - a^(1/2))/((c + d/x)^(1/2) - c^(1/2)))*(a^(1/2)*b*c^(3/2) - a^(3/2)*c^(1/2)*d))/(2*a*c^2) - (log(((c^(1/2)*
(a + b/x)^(1/2) - a^(1/2)*(c + d/x)^(1/2))*(b*c^(1/2) - (a^(1/2)*d*((a + b/x)^(1/2) - a^(1/2)))/((c + d/x)^(1/
2) - c^(1/2))))/((c + d/x)^(1/2) - c^(1/2)))*(a^(1/2)*b*c^(3/2) - a^(3/2)*c^(1/2)*d))/(2*a*c^2)